package com.bupt.godxian.charging.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bupt.godxian.charging.entity.ChargeArea;
import com.bupt.godxian.charging.entity.ChargeRequest;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ChargeAreaMapper extends BaseMapper<ChargeArea> {
    @Select("SELECT * FROM charge_area WHERE pile_id = #{pileId}")
    List<String> selectBypileId(@Param("pileId") String pileId);

    @Delete("delete from charge_area where request_id=#{request_id}")
    void deleteById(String request_id);

}
